




/*
*************************************************************************
*西瑞克斯研发管理系统
*版 本: 1.0   
*日 期：02/08/2012    
*作 者： 王浩 QQ：873987060   
*************************************************************************   
*/ 
package com.application.department.service;
import java.util.List;
import com.manager.BaseService;
import com.manager.commons.page.PageBean;
import com.application.department.entity.Department;
import com.application.department.struts.form.DepartmentForm;
import com.application.department.dao.DepartmentDAO;
 /**
 * 
 * Description:DepartmentService<br />
 * 
 * Version:V0.1<br />
 * 
 * Author: 左磊 QQ：30575951    <br />
 * 
 * History: <br />
 * 
 * 02/08/2012 
 * 
 */
public class DepartmentService extends BaseService
{
	private DepartmentDAO yfThesisDAO;

	public DepartmentDAO getDepartmentDAO() {
		return this.yfThesisDAO;
	}

	public void setDepartmentDAO(DepartmentDAO yfThesisDAO) {
		this.yfThesisDAO = yfThesisDAO;
	}
        

        public Department getDepartment(Department yfThesis) {
		return (Department) this.getBaseDao().queryByPk(yfThesis, yfThesis.getId());
	}
	
	public Integer getAllCountDepartment(DepartmentForm yfThesisForm){
		return this.yfThesisDAO.getAllCountDepartment(yfThesisForm);
	}
	
	public List<Department> searchDepartment(DepartmentForm yfThesisForm, PageBean pageBean) throws Exception {
		List<Department> yfThesisList = (List) this.yfThesisDAO.searchDepartment(yfThesisForm, pageBean);
		return yfThesisList;
	}
        
        public void deleteDepartments(DepartmentForm yfThesisForm){
	   this.yfThesisDAO.deleteDepartments(yfThesisForm);	 
	}
        public List searchDepartment(final DepartmentForm yfThesisForm) {
    		List<Department> yfThesisList = (List) this.yfThesisDAO.searchDepartment(yfThesisForm);
    		return yfThesisList;
    	}
}
